﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SNSpirit.Domain.Subscription
{
    public class PollSubscription<T> : SubscriptionBase<T>
    {
        internal PollSubscription(IPollCallback<T> callback, object[] parameters = null)
        {
            if (callback == null)
                throw new ArgumentNullException("callback");
            this._callback = callback;
            this.Parameters = parameters;
        }

        public string FriendlyName { get; set; }

        public override SubscribeMode Mode
        {
            get
            {
                return SubscribeMode.Poll;
            }
        }

        public override T Result
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public object[] Parameters { get; set; }

        public virtual void UpdateNow()
        {
            throw new NotImplementedException();
        }

        protected override void DisposeOnce()
        {
            throw new NotImplementedException();
        }

        #region private

        private IPollCallback<T> _callback;

        #endregion private
    }
}